Skip to content

Add VTX Admin telemetry script for B&W radios - #41

Open
jurgelenas wants to merge 2 commits into
masterfrom
bw-vtx-admin
Open

jurgelenas wants to merge 2 commits into
masterfrom
bw-vtx-admin

Conversation

@jurgelenas

Copy link
Copy Markdown
Member

No description provided.

ELRVTX shows the VTX tuning, power and the six 6POS presets on a
128x64 dashboard; ENTER opens a menu with the colour widget's
settings (VTX fields, Send VTx, 6POS quick change, presets).

The VTX Admin core moves to SCRIPTS/ELRS/vtx/ so the widget and the
telemetry script share it, along with the presets, now stored in
SCRIPTS/ELRS/vtx/presets.txt. The core ticks from background() so the
6POS automation runs whatever page is shown.

To fit B&W memory the menu is table-driven, dialogs load only when
needed, and the session drops discovery fields it no longer needs.
The loader reports why a script failed to load.
@jurgelenas
jurgelenas requested a review from CapnBry October 7, 2026 09:23
@jurgelenas
jurgelenas added this pull request to stack #44 October 7, 2026 09:24
@jurgelenas

jurgelenas commented Oct 7, 2026 •

Copy link
Copy Markdown
Member Author

UI for review

_overview-states _overview-telemetry _overview-vtx-presets

@CapnBry CapnBry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man this is amazing. Works perfectly as far as the functionality goes, just a couple notes.

Channel 0

If I booth with VTXAdmin off, launch the admin script, go into menu, shows channel 0. If I set the band, the channel stays 0 but the main screen and the top right show the correct channel, not 0. Same happens if I have VTX admin on and set the band to off then leave the menu and come back the channel displays 0. Maybe the channel and power should be hidden line power hides the pit mode item if the VTX Admin is off?

Also should this follow the same naming as the lua has with Band/Enable or whatever it says?

See other requested changes in comments

end

--- The VTX's tuning, not the switch: they differ after boot. Switch breaks ties.
local function activePreset()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function seems to be the same as the inline one in the widget's display.lua, broke into matchesVtx(), activeIdx(). Can we move that into a VTXAdmin.activePreset(), or am I missing something in this code here that behaves differently?

Comment thread edgetx.yml
- name: ELRS
path: SCRIPTS/ELRS
exclude:
- presets.txt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how this yaml works but does the exclude need the path or does it match any filename? The file is now in vtx/presets.txt

kept[id] = self._fields[id]
end
self._fields = kept
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where to tag this but:

  • At the end of loading the admin.onField() runs and deletes all the fields that loaded into its storage except the VTX ones via this retainFields()
  • However, once the VTXAdmin goes into passive mode and the user launches the tool script, _onEntry still fires and because it has _acceptUnsolicited set, it parses the field and adds it back into VTXAdmins fields list again. All the fields get added back to the _fields list so the retainFields only worked on the initial load.

I think the way to solve this is to set a flag in self._retainedOnly = true in retainFields(), then have _acceptUnsolicited check and only parse fields which are in _fields already if _retainedOnly is true. You'd also need to set _retainedOnly back to nil on reloadAll().

Comment thread README.md
end
end
return best
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Once a source moves, it can't be un-set without being returned to its original position. The encoder wheel stops working and you have to exit the field edit to be able to change it again.

Steps:

  • Enter the 6POS Quick Change submenu on B&W radio.
  • Lower throttle.
  • Select Source so it is in edit mode.
  • Raise the throttle. The source correctly becomes Thr. Leave the throttle high.
  • Try to use the encoder to change the item value, you can't because every update it jumps back to Thr

Maybe to fix this you'd change movedSource so when it returns best it updates srcStart for that item? That's how EdgeTx does it I believe. This one isn't a huge deal so if you find that it isn't so simple to fix then I'd not worry about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants